package com.fanghuaman.model.user.dto;

import lombok.Data;

/**
 * @author shiminghui
 * @date 2024/12/8 14:53
 * @description: 注册类
 */
@Data
public class RegisterDto {
    private String username;
    private String password;
    private String phone;

    /**
     * 判断参数是否合法
     *
     * @return
     */
    public boolean check() {
        if (username == null || password == null) {
            return false;
        }
        if (username.length() > 20 || password.length() > 16) {
            return false;
        }
        return true;
    }
}
